#include <iostream>
#include <memory>
#include <unistd.h>
#include "pthreadPool.hpp"

int main()
{
    unique_ptr<threadPool<int>> thp(new threadPool<int>);
    thp->init();
    thp->start();
    int cnt = 10;
    int cur = 1;
    while (cnt--)
    {
        /* code */
        thp->push_task(cur++);
        sleep(1);
    }
    
    cout<<"程序运行结束"<<endl;
    return 0;
}